-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OpenVINO]Session Options Appended After AppendExecutionProvider #23852
base: main
Are you sure you want to change the base?
Conversation
Changes to make sure to honor SessionOptions API Contract
config_options = &session_options->config_options; | ||
} | ||
|
||
std::array<const void*, 2> configs_array = {provider_options_map, config_options}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about declare a struct type?
struct OpenVINOProviderFactoryCreateParams {
const ProviderOptions* provider_options_map;
const ConfigOptions* config_options;
};
This would be much easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Earlier we had a similar structure but looking at this code, https://github.com/microsoft/onnxruntime/blob/99c51a326e0ff54a56e7b194204d459932084408/onnxruntime/core/session/provider_bridge_ort.cc#L1992C2-L1992C3
I desired to have consistency.
onnxruntime/core/providers/openvino/openvino_provider_factory.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/openvino/openvino_provider_factory.cc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run the code linter/formatter and also revise the title of the PR.
…runtime into sahar/session_options
@fs-eire Please comment. |
Description
To honor SessionOption API Contract the ordering of AddConfigOption and AppendExecutionProvider_OpenVINO should not matter. This PR is fixing that issue
Motivation and Context
This PR fixes a regression happened during last PR in ordering of SessionOptions.